﻿using System.Collections.Generic;
using System.Linq;
using AMM.Model;

namespace AMM.DataAccess.Config {
    public class ConfigurationRepository : BaseRepository<Configuration> {

        public Configuration FetchConfigurationByKeyCode(string keyCode) {
            using (var ctx = this.Context) {
                return ctx.Configurations.Find(keyCode);
            }
        }

        public List<Configuration> FetchConfigurationList() {
            using (var ctx = this.Context) {
                return ctx.Configurations.ToList();
            }
        }
    }
}
